---
title: Salesforce Sandbox
sidebarTitle: Salesforce Sandbox
---

import Overview from "/snippets/overview.mdx"
import PreBuiltTooling from "/snippets/generated/salesforce-sandbox/PreBuiltTooling.mdx"
import PreBuiltUseCases from "/snippets/generated/salesforce-sandbox/PreBuiltUseCases.mdx"

import { StatusWidget } from "/snippets/api-down-watch/status-widget.jsx"

<StatusWidget service="salesforce" />

<Overview />
<PreBuiltTooling />
<PreBuiltUseCases />

## Access requirements
| Pre-Requisites | Status | Comment|
| - | - | - |
| Paid dev account | ❓ |  |
| Paid test account | ❓ |  |
| Partnership | ❓ | |
| App review | ❓ |  |
| Security audit | ❓ | |


## Setup guide

_No setup guide yet._

<Tip>Need help getting started? Get help in the [community](https://nango.dev/slack).</Tip>

<Note>Contribute improvements to the setup guide by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/salesforce-sandbox.mdx)</Note>


## Useful links

-   [Get a free Salesforce Developer Edition here](https://developer.salesforce.com/free-trials) (it's a free Salesforce account to test your integration)
-   [Salesforce OAuth documentation](https://help.salesforce.com/s/articleView?id=sf.remoteaccess_authorization_code_credentials_flow.htm&type=5) (Step 7 contains the details of what Salesforce returns along with the token)
-   [Overview of OAuth scopes](https://help.salesforce.com/s/articleView?id=sf.connected_app_create_api_integration.htm&type=5)
-   [Web API docs (their REST API)](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest_resources.html)

<Note>Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/salesforce-sandbox.mdx)</Note>

## Connection Configuration in Nango

Salesforce uses a different API base URL, called the `instance_url`, for each customer.

Nango automatically retrieves the `instance_url` (e.g. `https://yourInstance.salesforce.com/`) from Salesforce and stores it in the Connection config for you.

If you use the Nango Proxy, it is automatically using the correct API base URL. But, if needed, you can retrieve the `instance_url` with the [backend SDK](/reference/sdks/node#get-a-connection-with-credentials) or [Connections API](/reference/api/connection/get).

## API gotchas

-   If you or your end-user are authorizing a Salesforce sandbox account, you must use the `salesforce-sandbox` integration in Nango. Your Salesforce Developer Edition account is **not** a Salesforce sandbox! Use it with the regular `salesforce` connector.
-   Salesforce calls the `client_id` and `client_secret` as `Consumer Key` and `Consumer Secret`.
-   To enable offline data access with a refresh token, add the `refresh_token` (or its synonym, `offline_access`) scope. By default, access tokens expire in ~2h (but customers can configure this value). Also, check the "Introspect All Tokens" checkbox in your OAuth app settings on the Salesforce developer portal (Salesforce doesn't share the expiration date of access tokens. Instead, Nango needs to call the Salesforce API to check if access tokens are valid.)
-   If you encounter an error in your flow that says `invalid_client_id`, [make sure your (developer) User's password does not contain any special characters](https://developer.salesforce.com/forums/?id=906F00000009ABLIA2) (yes, really.)

<Note>Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/salesforce-sandbox.mdx)</Note>
